package com.cskaoyan.service;

import com.cskaoyan.bean.ShowRegion;
import com.cskaoyan.bean.ShowRegionExample;
import com.cskaoyan.mapper.ShowRegionMapper;
import com.cskaoyan.wx.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author LiaoLong
 * @date 2021-05-12 22:10
 */
@Service
public class RegionServiceImpl implements RegionService {
    @Autowired
    private ShowRegionMapper showRegionMapper;

    @Override
    public List<ShowRegion> getRegionByPid(Integer pid) {
        ShowRegionExample showRegionExample = new ShowRegionExample();
        showRegionExample.createCriteria().andPidEqualTo(pid);
        List<ShowRegion> showRegions = showRegionMapper.selectByExample(showRegionExample);
        return showRegions;
    }
}
